/*******************************************************************
 * File:         acronyms.h
 * Purpose:      Acronyms translation
 * File purpose: Header for source code
 * Author:       Richard Butler & Gareth Duncan
 * Date:         20 Apr 2002
 ******************************************************************/

/*
    Acronyms - Translation of Internet and Computer-releated Acronyms
    Copyright  1996-1997-1998-1999-2000-2001-2002,
       Richard Butler & Gareth Duncan

    Thanks are due to Gareth Dukes for the sprites used in this program and
    Gareth Duncan for letting me (Rich) develop this program further.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/

// Off we go...
#ifndef ACRONYMS_H
#define ACRONYMS_H

// Libraries:
#include <stdio.h>    // Standand io
#include <string.h>   // String manipulations
#include <ctype.h>    // Various things
#include <stdlib.h>   // Utilities
#include <kernel.h>   // RISC OS Kernel access

#include "OSLib:wimp.h" // OSLib's wimp functions

// Definitions:
#define MAX_ACRONYMS 500 // The maximun amount of Acronyms we'll accept

#define VERSION "5.52 (20 April 2002)"

// Structures:
typedef struct window_data {
   int win_handle;
   unsigned char *buffer;
   unsigned char *workspace;
   char *win_name;
} window_data; // For handling window things

typedef struct menu_element {
   long int flags;
   long int submenu;
   long int menu_iconflags;
   char menu_text[12];
   struct menu_element *next_menuelem;
} menu_element; // An element in a menu

typedef struct menu_data {
   char title[12];
   int size;
   long int colours;
   long int width;
   long int height;
   long int vert_gap;
   unsigned char* datablock;
   menu_element *next_menuelem;
} menu_data; // Menus

// Functions in file "main":
extern void check_acronym(void);

// Functions in file "file":
extern void load_text_file(char *);
extern void initialise_text_files(void);

// Functions in file "wimp":
extern int wimp(void);
extern void wimpmsg(int, unsigned char[]);
extern void mouseclick(unsigned char[]);
extern void key_press(unsigned char []);
extern void menuselection(unsigned char[]);
extern void put_icon_text(char *, unsigned long int, unsigned long int);
extern unsigned long int byte_to_word(unsigned char *, int);
extern void word_to_byte(unsigned long int, unsigned char *, int);
extern int create_iconbar_icon(int, unsigned long int, unsigned long int);
extern int load_template(char *, window_data *, int);
extern char *get_ptr(unsigned long int, unsigned long int);
extern void build_menu(char *, menu_data *);
extern void add_to_menu(char *, long int, long int, long int, menu_data *);
extern void create_menu(menu_data *);

#endif
// ...And back we come
